#pragma once

#include "CoreMinimal.h"
#include "MBInstancedBatchDefine.h"
#include "MBInstancedBatchProxy.h"

class UMBInstancedStaticMeshComponent;

class FMBCustomInstancedBatchProxy : public FMBInstancedBatchProxyAbstract
{
	friend class UMBCustomBattleComponent;
public:
	FMBCustomInstancedBatchProxy(UActorComponent* InOwnerComponent);

public:
	void SetNumCustomDataFloats(int FloatNum){ CustomFloatNum = FloatNum; };
	void SetHidden(bool Value) {bHidden = Value;}

	virtual bool IsHidden() const override {return bHidden;}
	
	virtual void ApplyCustomData(TArray<float>& PerInstanceSMCustomData) override;
	virtual void ApplyTransform(TArray<FTransform>& PerInstanceSMData) override;
	virtual int NumCustomDataFloats() override;
	virtual bool IsRenderCustomDepth() override {return true;}

public:
	bool bHidden;
	int CustomFloatNum;
	TArray< FMBCustomInstanceBatchCharacterRenderInfo > UnitInfoArray;
	TWeakObjectPtr<UActorComponent> OwnerComponent = nullptr;
};
